<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
    <title>友情列表</title>
</head>
<body>
<div class="container mt-4">
    <h2 class="mb-4">友情连接管理</h2>
    <div style="float: right; margin: 10px 0px;">
        <a href="${pageContext.request.contextPath}/you/tiao/" class="btn btn-success">增加</a>
    </div>
    <table class="table table-striped table-hover">
        <thead class="table-dark">
        <tr>
            <th>友情ID</th>
            <th>友情连接名称</th>
            <th>友情连接地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${list}" var="youqing">
            <tr>
                <td>${youqing.id}</td>
                <td>${youqing.name}</td>
                <td>${youqing.url}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/you/delete/?id=${youqing.id}" class="btn btn-danger">删除</a>
                    <a href="${pageContext.request.contextPath}/you/huixian/?id=${youqing.id}" class="btn btn-primary">修改</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
<script src="${pageContext.request.contextPath}/js/bootstrap.bundle.min.js"></script>
</body>
</html>
